

package com.maoshi.shop.distribution.comment.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.maoshi.shop.distribution.comment.dto.DistributionUserWalletDto;
import com.maoshi.shop.distribution.comment.model.DistributionUserWallet;
import org.apache.ibatis.annotations.Param;

/**
 *
 * @author lgh on 2019/04/01.
 */
public interface DistributionUserWalletService extends IService<DistributionUserWallet> {
    /**
     * 根据分销员id获取可提现金额
     * @param distributionUserId
     * @return
     */
    Double getSettledAmountByDistributionUserId(Long distributionUserId);

    /**
     * 根据分销员id获取钱包id
     * @param distributionUserId 钱包id
     * @return
     */
    Long getWalletIdByDistributionUserId(@Param("distributionUserId")Long distributionUserId);

    /**
     *  返回钱包对象和用户vo分页
     * @param page
     * @param userMobile
     * @return
     */
    Page<DistributionUserWallet> getDistributionUserWalletAndDistributionUserVOPage(Page page, @Param("userMobile")String userMobile);

    /**
     * 人工修改钱包 并且添加一条钱包流水记录
     */
    void updateDistributionUserWallet(DistributionUserWallet distributionUserWallet,Long modifier);


    DistributionUserWalletDto getDistributionUserWalletDtoByDistributionUserId(Long distributionUserId);

}
